import * as constants from '../Constants'
import { get, GET_ELIMINATE_LIST } from '../../service/api'

export interface GetEliminateList {
  type: constants.GetEliminateList
  payload: Promise<any>
}

export interface GetEliminateList_PENDING {
  type: constants.GetEliminateList_PENDING
  payload: Promise<any>
}

export interface GetEliminateList_FULFILLED {
  type: constants.GetEliminateList_FULFILLED
  payload: any
}

export interface GetEliminateList_PAGE {
  type: constants.GetEliminateList_PAGE
  payload: any
}

export type EliminateAction = GetEliminateList | 
  GetEliminateList_FULFILLED | 
  GetEliminateList_PENDING | 
  GetEliminateList_PAGE

export function getEliminateList(param: any): GetEliminateList {
  return {
    type: constants.GetEliminateList,
    payload: get(GET_ELIMINATE_LIST, param)
  }
}
export function page(page: any): GetEliminateList_PAGE {
  return {
    type: constants.GetEliminateList_PAGE,
    payload: page
  }
}